Skip to content

[3.13] gh-156444: Fix a negated character set with IGNORECASE and LOCALE (GH-156445) - #156458

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
miss-islington:backport-6671d27-3.13
Aug 27, 2026
Merged

[3.13] gh-156444: Fix a negated character set with IGNORECASE and LOCALE (GH-156445)#156458
serhiy-storchaka merged 1 commit into
python:3.13from
miss-islington:backport-6671d27-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

charset_loc_ignore() tested the whole set once per locale case and took
the disjunction, which complements a set before closing it under case
instead of after: [bc] matched b'B', but so did [^bc]. Match both cases
of the character against every set member instead.
(cherry picked from commit 6671d27)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 5 (1M context) noreply@anthropic.com

…LE (pythonGH-156445)

charset_loc_ignore() tested the whole set once per locale case and took
the disjunction, which complements a set before closing it under case
instead of after: [bc] matched b'B', but so did [^bc].  Match both cases
of the character against every set member instead.
(cherry picked from commit 6671d27)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 27, 2026 11:12
@serhiy-storchaka
serhiy-storchaka merged commit 7e7e88f into python:3.13 Aug 27, 2026
44 of 47 checks passed
@miss-islington
miss-islington deleted the backport-6671d27-3.13 branch August 27, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants